#include<stdio.h>
//#define N 4
struct s
{
	int num;
	char name[10];
	float score;
};
int main()
{
	struct s x[4] = { {1001,"zhangsan",89},{1002,"lisi",88.5},{1003,"zhaowu",86},{1004,"wangliu",96} };
	//for (i = 0;i < N;i++)
		//scanf("%d%s%f", &x[i].no,&x[i].name, &x[i].score);
	struct s t;
	for (int i = 0;i < 3;i++)//i<N-1
	{
		int k = i;
		for (int j = i + 1;j <4 ;j++)//j<N
			if (x[i].score < x[j].score) k = j;
		t = x[k];		
		x[k] = x[i];	
		x[i] = t;
	}
	for (int i = 0;i < 4;i++)
	{
		printf("%d %s %f", x[i].num, x[i].name, x[i].score);
		printf("\n");
	}
	return 0;
}